package com.qf.openapi2204.es.esvo;

import lombok.AllArgsConstructor;
import lombok.Data;
import lombok.NoArgsConstructor;
import org.springframework.data.annotation.Id;
import org.springframework.data.elasticsearch.annotations.Document;
import org.springframework.data.elasticsearch.annotations.Field;
import org.springframework.data.elasticsearch.annotations.FieldType;

import java.util.Date;

@Data
@AllArgsConstructor
@NoArgsConstructor
@Document(indexName = "openapi-timecost-index",type = "openapi-timecost-type",shards = 1,replicas = 1,createIndex = false)
public class ApiTimeCostEsVo {

    @Id
    @Field(type = FieldType.Long)
    private Long id;// 唯一ID 1

    @Field(type = FieldType.Keyword)
    private String apiName ;
    @Field(type = FieldType.Date)
    private Date start;
    @Field(type = FieldType.Date)
    private Date end;
    @Field(type = FieldType.Long)
    private long timecost;
    @Field(type = FieldType.Keyword)
    private String appKey;
    @Field(type = FieldType.Keyword)
    private String remoteIp;  // 客户端ip
    @Field(type = FieldType.Keyword)
    private String serverIp;  // 网关的ip

}
